/*----------------------------------------------------------------------------*\
| /gamemode/chatcommands.lua           | chat commands                   | SRV |
\*----------------------------------------------------------------------------*/

local function me(ply,args)
	local rf = RecipientFilter()
	for k,v in pairs( GetNearbyPlayers(ply:GetPos(),256) ) do
		rf:AddPlayer( v )
	end
	SendChatMessage( ply:Name() .. string.Right(args,string.len(args)-1), CHAT_COL_ACT, rf )
	return ""
end
AddChatCommand("/me",function(ply,tab) me(ply,tab) end)

local function yell(ply,args)
	local rf1 = RecipientFilter()
	local rf2 = RecipientFilter()
	for k,v in pairs( GetNearbyPlayers(ply:GetPos(),512) ) do
		rf2:AddPlayer( v )
	end
	for k,v in pairs( GetNearbyPlayers(ply:GetPos(),256) ) do
		rf1:AddPlayer( v )
		rf2:RemovePlayer( v )
	end
	SendChatMessage( ply:Name() .. " yells: ".. string.Right(args,string.len(args)-1), CHAT_COL_WARN, rf1 )
	SendChatMessage( "Someone yells: ".. string.Right(args,string.len(args)-1), CHAT_COL_WARN, rf2 )
	return ""
end
AddChatCommand("/y",function(ply,tab) yell(ply,tab) end)
AddChatCommand("/yell",function(ply,tab) yell(ply,tab) end)
AddChatCommand("/shout",function(ply,tab) yell(ply,tab) end)

local function help(ply,args)